/** * Jindo2 Framework * @version 1.2.2 */ if(typeof window!="undefined"&&typeof window.nhn=="undefined"){window.nhn=new Object;} function $Jindo(){var cl=arguments.callee;var cc=cl._cached;if(cc)return cc;if(!(this instanceof cl))return new cl();if(!cc)cl._cached=this;this.version="1.2.2";} function $(sID){var ret=new Array;var el=null;var reg=/^<([a-z]+|h[1-5])>$/i;var reg2=/^<([a-z]+|h[1-5])(\s+[^>]+)?>/i;for(var i=0;i1?ret:(ret[0]||null);} function $Class(oDef){function typeClass(){var t=this;var a=[];while(typeof t.$super!="undefined"){t.$super.$this=this;if(typeof t.$super.$init=="function")a[a.length]=t;t=t.$super;} for(var i=a.length-1;i>-1;i--)a[i].$super.$init.apply(a[i].$super,arguments);if(typeof this.$init=="function")this.$init.apply(this,arguments);} if(typeof oDef.$static!="undefined"){var i=0,x;for(x in oDef)x=="$static"||i++;for(x in oDef.$static)typeClass[x]=oDef.$static[x];if(!i)return oDef.$static;delete oDef.$static;} typeClass.prototype=oDef;typeClass.prototype.constructor=typeClass;typeClass.extend=$Class.extend;return typeClass;} $Class.extend=function(superClass){this.prototype.$super=new Object;var superFunc=function(m,func){return function(){var f=this.$this[m];var t=this.$this;var r=(t[m]=func).apply(t,arguments);t[m]=f;return r;};};for(var x in superClass.prototype){if(typeof this.prototype[x]=="undefined"&&x!="$init")this.prototype[x]=superClass.prototype[x];if(typeof superClass.prototype[x]=="function"){this.prototype.$super[x]=superFunc(x,superClass.prototype[x]);}else{this.prototype.$super[x]=superClass.prototype[x];}} for(var x in superClass){if(x=="prototype")continue;this[x]=superClass[x];} return this;};function $Agent(){var cl=arguments.callee;var cc=cl._cached;if(cc)return cc;if(!(this instanceof cl))return new cl;if(!cc)cl._cached=this;} $Agent.prototype.navigator=function(){var info=new Object;var ver=-1;var u=navigator.userAgent;var v=navigator.vendor||"";function f(s,h){return((h||"").indexOf(s)>-1)};info.opera=(typeof window.opera!="undefined")||f("Opera",u);info.ie=!info.opera&&f("MSIE",u);info.chrome=f("Chrome",u);info.safari=!info.chrome&&f("Apple",v);info.mozilla=f("Gecko",u)&&!info.safari&&!info.chrome;info.firefox=f("Firefox",u);info.camino=f("Camino",v);info.netscape=f("Netscape",u);info.omniweb=f("OmniWeb",u);info.icab=f("iCab",v);info.konqueror=f("KDE",v);try{if(info.ie){ver=u.match(/(?:MSIE) ([0-9.]+)/)[1];}else if(info.firefox||info.opera||info.omniweb){ver=u.match(/(?:Firefox|Opera|OmniWeb)\/([0-9.]+)/)[1];}else if(info.mozilla){ver=u.match(/rv:([0-9.]+)/)[1];}else if(info.safari){ver=parseFloat(u.match(/Safari\/([0-9.]+)/)[1]);if(ver==100){ver=1.1;}else{ver=[1.0,1.2,-1,1.3,2.0,3.0][Math.floor(ver/100)];}}else if(info.icab){ver=u.match(/iCab[ \/]([0-9.]+)/)[1];}else if(info.chrome){ver=u.match(/Chrome[ \/]([0-9.]+)/)[1];} info.version=parseFloat(ver);if(isNaN(info.version))info.version=-1;}catch(e){info.version=-1;} $Agent.prototype.navigator=function(){return info;};return info;};$Agent.prototype.os=function(){var info=new Object;var u=navigator.userAgent;var p=navigator.platform;var f=function(s,h){return(h.indexOf(s)>-1)};info.win=f("Win",p);info.mac=f("Mac",p);info.linux=f("Linux",p);info.win2000=info.win&&(f("NT 5.0",p)||f("2000",p));info.winxp=info.win&&(f("NT 5.1",p)||f("Win32",p));info.xpsp2=info.winxp&&(f("SV1",u)||f("MSIE 7",u));info.vista=f("NT 6.0",p);$Agent.prototype.os=function(){return info;};return info;};$Agent.prototype.flash=function(){var info=new Object;var p=navigator.plugins;var m=navigator.mimeTypes;var f=null;info.installed=false;info.version=-1;if(typeof p!="undefined"&&p.length){f=p["Shockwave Flash"];if(f){info.installed=true;if(f.description){info.version=parseFloat(f.description.match(/[0-9.]+/)[0]);}} if(p["Shockwave Flash 2.0"]){info.installed=true;info.version=2;}}else if(typeof m!="undefined"&&m.length){f=m["application/x-shockwave-flash"];info.installed=(f&&f.enabledPlugin);}else{for(var i=10;i>1;i--){try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);info.installed=true;info.version=i;break;}catch(e){}}} $Agent.prototype.info=function(){return info;};return info;};$Agent.prototype.silverlight=function(){var info=new Object;var p=navigator.plugins;var s=null;info.installed=false;info.version=-1;if(typeof p!="undefined"&&p.length){s=p["Silverlight Plug-In"];if(s){info.installed=true;info.version=parseInt(s.description.split(".")[0]);if(s.description=="1.0.30226.2")info.version=2;}}else{try{s=new ActiveXObject("AgControl.AgControl");info.installed=true;if(s.isVersionSupported("2.0")){info.version=2;}else if(s.isVersionSupported("1.0")){info.version=1;}}catch(e){}} $Agent.prototype.silverlight=function(){return info;};return info;};function $A(array){var cl=arguments.callee;if(typeof array=="undefined")array=[];if(array instanceof cl)return array;if(!(this instanceof cl))return new cl(array);this._array=[];for(var i=0;i-1);};$A.prototype.indexOf=function(any){if(typeof this._array.indexOf!='undefined')return this._array.indexOf(any);for(var i=0;iMath.random()?1:-1});return this;};$A.prototype.unique=function(){var a=this._array,b=[],l=a.length;var i,j;for(i=0;i=b.length)b[j]=a[i];} this._array=b;return this;};$A.prototype.reverse=function(){this._array.reverse();return this;};$A.prototype.empty=function(){return this.length(0);};$A.Break=function(){if(!(this instanceof arguments.callee))throw new arguments.callee;};$A.Continue=function(){if(!(this instanceof arguments.callee))throw new arguments.callee;};function $Ajax(url,option){var cl=arguments.callee;if(!(this instanceof cl))return new cl(url,option);function _getXHR(){if(window.XMLHttpRequest){return new XMLHttpRequest();}else if(ActiveXObject){try{return new ActiveXObject('MSXML2.XMLHTTP');} catch(e){return new ActiveXObject('Microsoft.XMLHTTP');} return null;}} var loc=location.toString();var domain='';try{domain=loc.match(/^https?:\/\/([a-z0-9_\-\.]+)/i)[1];}catch(e){} this._url=url;this._options=new Object;this._headers=new Object;this._options={type:"xhr",method:"post",proxy:"",timeout:0,onload:function(req){},ontimeout:function(req){},jsonp_charset:"utf-8"};this.option(option);var _opt=this._options;_opt.type=_opt.type.toLowerCase();_opt.method=_opt.method.toLowerCase();if(typeof window.__jindo2_callback=="undefined"){window.__jindo2_callback=new Array();} switch(_opt.type){case"get":case"post":_opt.method=_opt.type;_opt.type="xhr";case"xhr":this._request=_getXHR();break;case"flash":this._request=new $Ajax.SWFRequest();break;case"jsonp":_opt.method="get";this._request=new $Ajax.JSONPRequest();this._request.charset=_opt.jsonp_charset;break;case"iframe":this._request=new $Ajax.FrameRequest();this._request._proxy=_opt.proxy;break;}};$Ajax.prototype._onload=function(){if(this._request.readyState==4){this._options.onload($Ajax.Response(this._request));}};$Ajax.prototype.request=function(oData){var t=this;var req=this._request;var opt=this._options;var data,v,a=[],data="";var _timer=null;if(typeof oData=="undefined"||!oData){data=null;}else{for(var k in oData){v=oData[k];if(typeof v=="function")v=v();a[a.length]=k+"="+encodeURIComponent(v);} data=a.join("&");} req.open(opt.method.toUpperCase(),this._url,true);req.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");req.setRequestHeader("charset","utf-8");for(var x in this._headers){if(typeof this._headers[x]=="function")continue;req.setRequestHeader(x,String(this._headers[x]));} if(typeof req.onload!="undefined"){req.onload=function(rq){clearTimeout(_timer);t._onload(rq)};}else{req.onreadystatechange=function(rq){clearTimeout(_timer);t._onload(rq)};} if(opt.timeout>0){_timer=setTimeout(function(){try{req.abort();}catch(e){};opt.ontimeout(req);},opt.timeout*1000);} req.send(data);return this;};$Ajax.prototype.abort=function(){this._request.abort();return this;};$Ajax.prototype.option=function(name,value){if(typeof name=="undefined")return"";if(typeof name=="string"){if(typeof value=="undefined")return this._options[name];this._options[name]=value;return this;} try{for(var x in name)this._options[x]=name[x]}catch(e){};return this;};$Ajax.prototype.header=function(name,value){if(typeof name=="undefined")return"";if(typeof name=="string"){if(typeof value=="undefined")return this._headers[name];this._headers[name]=value;return this;} try{for(var x in name)this._headers[x]=name[x]}catch(e){};return this;};$Ajax.Response=function(req){if(this===$Ajax)return new $Ajax.Response(req);this._response=req;};$Ajax.Response.prototype.xml=function(){return this._response.responseXML;};$Ajax.Response.prototype.text=function(){return this._response.responseText;};$Ajax.Response.prototype.json=function(){if(this._response.responseJSON){return this._response.responseJSON;}else if(this._response.responseText){try{return eval("("+this._response.responseText+")");}catch(e){return{};}} return{};};$Ajax.Response.prototype.header=function(name){if(typeof name=="string")return this._response.getResponseHeader(name);return this._response.getAllResponseHeaders();};$Ajax.RequestBase=$Class({_headers:{},_respHeaders:{},_respHeaderString:"",responseXML:null,responseJSON:null,responseText:"",$init:function(){},onload:function(){},abort:function(){},open:function(){},send:function(){},setRequestHeader:function(sName,sValue){this._headers[sName]=sValue;},getResponseHeader:function(sName){return this._respHeaders[sName]||"";},getAllResponseHeaders:function(){return this._respHeaderString;},_getCallbackInfo:function(){var id="";do{id="$"+Math.floor(Math.random()*10000);}while(window.__jindo2_callback[id]);return{id:id,name:"window.__jindo2_callback."+id};}});$Ajax.JSONPRequest=$Class({charset:"utf-8",_script:null,_callback:function(data){var self=this;this.readyState=4;this.responseJSON=data;this.onload(this);setTimeout(function(){self.abort()},10);},abort:function(){if(this._script){try{this._script.parentNode.removeChild(this._script)}catch(e){};}},open:function(method,url){this.responseJSON=null;this._url=url;},send:function(data){var t=this;var info=this._getCallbackInfo();var head=document.getElementsByTagName("head")[0];this._script=$("